package dfbz.homework1;

import java.util.Random;

public class Test03 {
    public static void main(String[] args) {
        printRd(5,new Random());
    }
    public static void printRd(int count,Random rd){//传入参数一个计数器，控制打印次数。另一个传入random随机数（匿名
        for (int i = 0; i <count ; i++) {
            int num=rd.nextInt(10)+1;
            System.out.println(num);
        }
    }
}
